home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Check if a file exists?
- Date: 15 Apr 1996 11:48:49 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4ktd31$8hd@sparcserver.lrz-muenchen.de>
- References: <829565947.AA00181@escan.demon.co.uk>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- Bill Birrell <bill@escan.demon.co.uk> writes:
-
- > > That would be implemented in Unix using stat(),
- > > however that isn't a standard
- > > C library function.
-
- > That's odd, Lawrence. K&R Edn 1, Ch 8, P 170 says it is, as part of the
- >unix system interface, and refers to sys/stat.h for the definition of the stat
- >structure.
-
- The _unix system interface_ obviously is _not_ a part of the standard C
- library.
-
- >Compatibility is listed as:-
-
- > unix,
- > 16 bit: dos, qwin,win, win dll
- > 32 bit: Dos32X
-
- I have my doubts that K&R lists "win", "win dll", etc. for stat(), so this
- list must come from another source. I would not be so sure that _all_
- DOS implementations have stat(). stat() _is_ a POSIX.1 function, so your
- chances of finding it on a lot of systems are not bad, but:
-
- > Note:
- > use _stat for compatibility with ANSI naming conventions of non-ANSI
- >functions. Use stat and link with OLDNAMES.LIB for UNIX compatibility.
-
- This should give you a clue that stat() is _not_ a function from the
- standard C library, shouldn't it?
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
-